import Vue from 'vue'
const Bus = new Vue({
  data () {
    return {
      emit (event, ...args) {
        this.$emit(event, ...args)
      },
      on (event, callback) {
        this.$on(event, callback)
      },
      once (event, callback) {
        this.$once(event, callback)
      }
    }
  }
})

export default {
  name: 'bus',
  default: Bus
}
